<div class="container">
   <ul class="nav nav-tabs">
        <li class="active"><a href="#tab1" data-toggle="tab">Dispositivos</a></li>
        <li class=""><a href="#tab2" data-toggle="tab">Geocercas</a></li>
        <div class="btn-group pull-right">
            <a class="btn btn-default" href="#"> Acciones</a>
            <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
            <ul class="dropdown-menu" >
              <li><a href='#modalDispositivos' onClick="$('#agregaDispositivo').reset()" data-toggle='modal'><i class="glyphicon glyphicon-plus"></i> Agregar</a></li>
              <li><a href='#' onclick='eliminar_dispositivos()'><i class="glyphicon glyphicon-trash"></i> Eliminar</a></li>
              <li><a href="#" onclick="getDispositivo()"><i class="glyphicon glyphicon-pencil"></i> Modificar</a></li>
              <li class="divider"></li>
              <li><a href="#" onclick="mostrar_punto()"><i class="glyphicon glyphicon-map-marker"></i> Último Punto</a></li>
              <li><a href="#"  onclick="return setId(0)"><i class="glyphicon glyphicon-list-alt"></i> Tabla Recorrido</a></li>
            </ul>
        </div>
    </ul>
    
    <div class="tab-content">
        <div class="tab-pane active" id="tab1">
            <?php 
                if ($session_data['tipoUsuario'] == "ROOT"){ ?>
                       <table  id="tablaDispositivos" class="table tableborder table-hover table-condensed">
                           <thead>
                           <tr class="headTable">
                               <th></th>
                               <th>Serie</th>
                               <th>Empresa</th>
                               <th>Asignado A</th>
                               <th>Tel&eacute;fono</th>
                               <th>Fecha Alta</th>
                               <th>Minutos</th>
                               <th></th>
                           </tr>
                           </thead>
                           <tbody>
                           <?php   foreach ($datos['datos'] as $row) { ?>
                                   <tr id="<?php echo $row['iddispositivo']; ?>">
                                       <td><?php echo $row['iddispositivo']; ?></td>
                                       <td><?php echo $row['serie']; ?></td>
                                       <td><?php echo $row['nombre']; ?></td>
                                       <td><?php echo $row['asignadoa']; ?></td>
                                       <td><?php echo $row['numtelefono']; ?></td>
                                       <td><?php echo $row['fechaalta']; ?></td>
                                       <td><?php echo $row['minutos']; ?></td>
                                       <td>
                                         <a  class="btn btn-info btn-xs" onclick="getDispositivo('<?php echo $row['iddispositivo']; ?>')" href="#" ><i class="glyphicon glyphicon-map-marker"></i></a>
                                         <a  class="btn btn-success btn-xs" href="#" onclick="eliminar_dispositivos('<?php echo $row['iddispositivo']; ?>')"><i class="glyphicon glyphicon-list-alt"></i></a>
                                       </td>
                                    </tr>
                           <?php  } ?>
                           </tbody>
                       </table>
               <?php }
                else{ ?>
                   <table  id="tablaDispositivos" class="table tableborder table-hover table-condensed">
                           <thead class="headTable">
                           <tr>
                               <th></th>
                               <th>Serie</th>
                               <th>Asignado A</th>
                               <th>Tel&eacute;fono</th>
                               <th>Fecha Alta</th>
                               <th>Minutos</th>
                               <th></th>
                           </tr>
                           </thead>
                           <tbody>
                           <?php   foreach ($datos['datos'] as $row) { ?>
                                   <tr id="<?php echo $row['iddispositivo']; ?>">
                                       <td><?php echo $row['iddispositivo']; ?></td>
                                       <td><?php echo $row['serie']; ?></td>
                                       <td><?php echo $row['asignadoa']; ?></td>
                                       <td><?php echo $row['numtelefono']; ?></td>
                                       <td><?php echo $row['fechaalta']; ?></td>
                                       <td><?php echo $row['minutos']; ?></td>
                                       <td>
                                           <a class="btn btn-info btn-xs" href="#" onclick="mostrar_punto('<?php echo $row['iddispositivo']; ?>')" title="Último Punto"><i class="glyphicon glyphicon-map-marker"></i></a>
                                           <a class="btn btn-success btn-xs" href="#panelruta" data-toggle="modal"  onclick="setId('<?php echo $row['iddispositivo']; ?>')" title="Tabla Posiciones"><i class="glyphicon glyphicon-list-alt"></i></a>
                                       </td>
                                    </tr>
                           <?php  } ?>
                           </tbody>
                       </table>
              <?php  } ?>
        </div>
        <div class="tab-pane" id="tab2">
            <?php echo "Hola"; ?>
        </div>
    </div>
    
        

   	
</div> <!-- /container-->